package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/5/31.
 */
@HttpInlet(Net.CODE)
public class PostCode extends WHAsyPost<PostCode.Info>{

    public String mobile;
    public String action;
    public PostCode(String mobile,String action,AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.mobile=mobile;
        this.action=action;
    }

    @Override
    protected Info parser(JSONObject object) {
        Info info = new Info();
        try {
            info.message=object.getString("message");
            info.code=object.getString("code");
            return info;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static class Info{
        public String message;
        public String code;
    }
}
